package com.shangdiao.sd_server.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shangdiao.sd_server.dao.mybatis.ExtraMapper;
import com.shangdiao.sd_server.dao.mybatis.SdCertificateMapper;
import com.shangdiao.sd_server.dao.mybatis.SdEduExpMapper;
import com.shangdiao.sd_server.dao.mybatis.SdFeedbackMapper;
import com.shangdiao.sd_server.dao.mybatis.SdInExpMapper;
import com.shangdiao.sd_server.dao.mybatis.SdInternshipReviewMapper;
import com.shangdiao.sd_server.dao.mybatis.SdLabelMapper;
import com.shangdiao.sd_server.dao.mybatis.SdOutExpMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPCollectionMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPInternshipMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPParttimeMapper;
import com.shangdiao.sd_server.dao.mybatis.SdParttimeReviewMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPersonBaseMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPersonMapper;
import com.shangdiao.sd_server.dao.mybatis.SdPersonPhotoMapper;
import com.shangdiao.sd_server.generator.pojo.SdCertificate;
import com.shangdiao.sd_server.generator.pojo.SdCertificateExample;
import com.shangdiao.sd_server.generator.pojo.SdEduExp;
import com.shangdiao.sd_server.generator.pojo.SdEduExpExample;
import com.shangdiao.sd_server.generator.pojo.SdFeedback;
import com.shangdiao.sd_server.generator.pojo.SdInExp;
import com.shangdiao.sd_server.generator.pojo.SdInExpExample;
import com.shangdiao.sd_server.generator.pojo.SdInternshipReview;
import com.shangdiao.sd_server.generator.pojo.SdInternshipReviewExample;
import com.shangdiao.sd_server.generator.pojo.SdLabel;
import com.shangdiao.sd_server.generator.pojo.SdLabelExample;
import com.shangdiao.sd_server.generator.pojo.SdOutExp;
import com.shangdiao.sd_server.generator.pojo.SdOutExpExample;
import com.shangdiao.sd_server.generator.pojo.SdPCollection;
import com.shangdiao.sd_server.generator.pojo.SdPCollectionExample;
import com.shangdiao.sd_server.generator.pojo.SdPInternship;
import com.shangdiao.sd_server.generator.pojo.SdPInternshipExample;
import com.shangdiao.sd_server.generator.pojo.SdPParttime;
import com.shangdiao.sd_server.generator.pojo.SdPParttimeExample;
import com.shangdiao.sd_server.generator.pojo.SdParttimeReview;
import com.shangdiao.sd_server.generator.pojo.SdParttimeReviewExample;
import com.shangdiao.sd_server.generator.pojo.SdPerson;
import com.shangdiao.sd_server.generator.pojo.SdPersonBase;
import com.shangdiao.sd_server.generator.pojo.SdPersonBaseExample;
import com.shangdiao.sd_server.generator.pojo.SdPersonExample;
import com.shangdiao.sd_server.generator.pojo.SdPersonPhoto;
import com.shangdiao.sd_server.generator.pojo.SdPersonPhotoExample;
import com.shangdiao.sd_server.pojo.Row;
import com.shangdiao.sd_server.service.PersonService;

@Service(value = "personService")
public class PersonServiceImpl implements PersonService {
	
    @Autowired
    SdPersonBaseMapper personBaseMapper;
    
    @Autowired
    SdPersonMapper personMapper;
    
    @Autowired
    SdEduExpMapper eduExpMapper;

    @Autowired
    SdInExpMapper inExpMapper;
    
    @Autowired
    SdOutExpMapper outExpMapper;
    
    @Autowired
    SdCertificateMapper certificateMapper;
    
    @Autowired
    SdLabelMapper labelMapper;
    
    @Autowired
    SdPersonPhotoMapper personPhotoMapper;
    
    @Autowired
    SdPCollectionMapper pCollectionMapper;
    
    @Autowired
    SdPInternshipMapper pInternshipMapper;
    
    @Autowired
    SdPParttimeMapper pParttimeMapper;
    
    @Autowired
    SdParttimeReviewMapper parttimeReviewMapper;
    
    @Autowired
    SdInternshipReviewMapper internshipReviewMapper;
    
    @Autowired
    ExtraMapper extraMapper;
    
    @Autowired
    SdFeedbackMapper feedbackMapper;
    
	@Override
	public int countPersonBaseByExample(SdPersonBaseExample example) {
		return personBaseMapper.countByExample(example);
	}

	@Override
	public int insertPersonBase(SdPersonBase personBase) {
		return personBaseMapper.insertSelective(personBase);
		
	}

	@Override
	public int insertPerson(SdPerson person) {
		return personMapper.insertSelective(person);
	}

	@Override
	public List<SdPersonBase> selectPersonBaseByExample(SdPersonBaseExample example) {
		return personBaseMapper.selectByExample(example);
	}

	@Override
	public SdPerson selectPersonById(Integer personId) {
		return personMapper.selectByPrimaryKey(personId);
	}

	@Override
	public SdPersonBase selectPersonBaseById(Integer personId) {
		return personBaseMapper.selectByPrimaryKey(personId);
	}

	@Override
	public int updatePersonById(SdPerson person) {
		return personMapper.updateByPrimaryKeySelective(person);
	}

	@Override
	public int updatePersonBaseById(SdPersonBase personBase) {
		return personBaseMapper.updateByPrimaryKeySelective(personBase);
	}

	@Override
	public int insertEduExp(SdEduExp eduExp) {
		return eduExpMapper.insertSelective(eduExp);
	}

	@Override
	public int insertInExp(SdInExp inExp) {
		return inExpMapper.insertSelective(inExp);
	}

	@Override
	public int insertOutExp(SdOutExp outExp) {
		return outExpMapper.insertSelective(outExp);
	}

	@Override
	public int insertCertificate(SdCertificate certificate) {
		return certificateMapper.insertSelective(certificate);
	}

	@Override
	public int insertLabel(SdLabel label) {
		return labelMapper.insertSelective(label);
	}

	@Override
	public int insertPhoto(SdPersonPhoto personPhoto) {
		return personPhotoMapper.insertSelective(personPhoto);
	}

	@Override
	public int updateEduExp(SdEduExp eduExp) {
		return eduExpMapper.updateByPrimaryKeySelective(eduExp);
	}

	@Override
	public int deleteEduExp(Integer expId) {
		return eduExpMapper.deleteByPrimaryKey(expId);
	}

	@Override
	public int deleteInExp(Integer expId) {
		return inExpMapper.deleteByPrimaryKey(expId);
	}

	@Override
	public int updateInExp(SdInExp inExp) {
		return inExpMapper.updateByPrimaryKeySelective(inExp);
	}

	@Override
	public int deleteOutExp(Integer expId) {
		return outExpMapper.deleteByPrimaryKey(expId);
	}

	@Override
	public int updateOutExp(SdOutExp outExp) {
		return outExpMapper.updateByPrimaryKeySelective(outExp);
	}

	@Override
	public List<SdEduExp> selectEduExpByExample(SdEduExpExample example) {
		return eduExpMapper.selectByExample(example);
	}

	@Override
	public List<SdInExp> selectInExpByExample(SdInExpExample example) {
		return inExpMapper.selectByExample(example);
	}

	@Override
	public List<SdOutExp> selectOutExpByExample(SdOutExpExample example) {
		return outExpMapper.selectByExample(example);
	}

	@Override
	public List<SdCertificate> selectCertificateByExample(SdCertificateExample example) {
		return certificateMapper.selectByExample(example);
	}

	@Override
	public List<SdLabel> selectLabelByExample(SdLabelExample example) {
		return labelMapper.selectByExample(example);
	}

	@Override
	public List<SdPersonPhoto> selectPersonPhotoByExample(SdPersonPhotoExample example) {
		return personPhotoMapper.selectByExample(example);
	}

	@Override
	public int updateCertificate(SdCertificate certificate) {
		return certificateMapper.updateByPrimaryKeySelective(certificate);
	}

	@Override
	public int updateLabel(SdLabel label) {
		return labelMapper.updateByPrimaryKeySelective(label);
	}
	
	@Override
	public int updateLabel(SdLabel label, SdLabelExample example) {
		return labelMapper.updateByExampleSelective(label, example);
	}

	@Override
	public int updatePhoto(SdPersonPhoto personPhoto) {
		return personPhotoMapper.updateByPrimaryKeySelective(personPhoto);
	}

	@Override
	public int insertPCollection(SdPCollection pCollection) {
		return pCollectionMapper.insertSelective(pCollection);
	}

	@Override
	public int updatePCollection(SdPCollection pCollection) {
		return pCollectionMapper.updateByPrimaryKeySelective(pCollection);
	}

	@Override
	public List<SdPCollection> selectPCollectionList(SdPCollectionExample example) {
		return pCollectionMapper.selectByExample(example);
	}

	@Override
	public int insertPInternship(SdPInternship pInternship) {
		return pInternshipMapper.insertSelective(pInternship);
	}

	@Override
	public int updatePInternship(SdPInternship pInternship) {
		return pInternshipMapper.updateByPrimaryKeySelective(pInternship);
	}

	@Override
	public List<SdPInternship> selectPInternshipList(SdPInternshipExample example) {
		return pInternshipMapper.selectByExample(example);
	}

	@Override
	public int insertPParttime(SdPParttime pParttime) {
		return pParttimeMapper.insertSelective(pParttime);
	}

	@Override
	public int updatePParttime(SdPParttime pParttime) {
		return pParttimeMapper.updateByPrimaryKeySelective(pParttime);
	}

	@Override
	public List<SdPParttime> selectPParttimeList(SdPParttimeExample example) {
		return pParttimeMapper.selectByExample(example);
	}

	@Override
	public int countPInternship(SdPInternshipExample example) {
		return pInternshipMapper.countByExample(example);
	}

	@Override
	public int countPParttime(SdPParttimeExample example) {
		return pParttimeMapper.countByExample(example);
	}

	@Override
	public SdCertificate selectCertificateById(Integer certificateId) {
		return certificateMapper.selectByPrimaryKey(certificateId);
	}

	@Override
	public SdPersonPhoto selectPersonPhotoById(Integer personPhotoId) {
		return personPhotoMapper.selectByPrimaryKey(personPhotoId);
	}

	@Override
	public int updatePCollectionByExample(SdPCollection pCollection, SdPCollectionExample example) {
		return pCollectionMapper.updateByExampleSelective(pCollection, example);
	}

	@Override
	public int insertParttimeReview(SdParttimeReview parttimeReview) {
		return parttimeReviewMapper.insertSelective(parttimeReview);
	}

	@Override
	public int insertInternshipReview(SdInternshipReview internshipReview) {
		return internshipReviewMapper.insertSelective(internshipReview);
	}

	@Override
	public List<SdPerson> selectPersonByExample(SdPersonExample example) {
		return personMapper.selectByExample(example);
	}

	@Override
	public List<Row> getMyInvitation(Row paramRow) {
		return extraMapper.getMyInvitation(paramRow);
	}

	@Override
	public int countPersonByExample(SdPersonExample example) {
		return personMapper.countByExample(example);
	}

	@Override
	public int countParttimeReview(SdParttimeReviewExample example) {
		return parttimeReviewMapper.countByExample(example);
	}

	@Override
	public int countInternshipReview(SdInternshipReviewExample example) {
		return internshipReviewMapper.countByExample(example);
	}

	@Override
	public int insertFeedback(SdFeedback feedback) {
		return feedbackMapper.insertSelective(feedback);
	}

	@Override
	public List<Row> selectInternshipHotLabel() {
		return extraMapper.selectInternshipHotLabel();
	}

	@Override
	public List<Row> selectParttimeHotLabel() {
		return extraMapper.selectParttimeHotLabel();
	}

	@Override
	public int updatePCollection(SdPCollection pCollection, SdPCollectionExample pCollectionExample) {
		return pCollectionMapper.updateByExampleSelective(pCollection, pCollectionExample);
	}

	@Override
	public int updateEduExp(SdEduExp eduExp, SdEduExpExample eduExpExample) {
		return eduExpMapper.updateByExampleSelective(eduExp, eduExpExample);
	}

	@Override
	public int updateInExp(SdInExp inExp, SdInExpExample inExpExample) {
		return inExpMapper.updateByExampleSelective(inExp,inExpExample);
	}

	@Override
	public int updateOutExp(SdOutExp outExp, SdOutExpExample outExpExample) {
		return outExpMapper.updateByExampleSelective(outExp, outExpExample);
	}

	@Override
	public int updateCertificate(SdCertificate certificate, SdCertificateExample certificateExample) {
		return certificateMapper.updateByExampleSelective(certificate, certificateExample);
	}

	@Override
	public int updatePhoto(SdPersonPhoto personPhoto, SdPersonPhotoExample personPhotoExample) {
		return personPhotoMapper.updateByExampleSelective(personPhoto, personPhotoExample);
	}

	@Override
	public int updatePInternship(SdPInternship pInternship, SdPInternshipExample pInternshipExample) {
		return pInternshipMapper.updateByExampleSelective(pInternship, pInternshipExample);
	}

	@Override
	public int updatePParttime(SdPParttime pParttime, SdPParttimeExample pParttimeExample) {
		return pParttimeMapper.updateByExampleSelective(pParttime, pParttimeExample);
	}

	@Override
	public int updateParttimeReview(SdParttimeReview parttimeReview, SdParttimeReviewExample parttimeReviewExample) {
		return parttimeReviewMapper.updateByExampleSelective(parttimeReview, parttimeReviewExample);
	}

	@Override
	public int updateInternshipReview(SdInternshipReview internshipReview, SdInternshipReviewExample internshipReviewExample) {
		return internshipReviewMapper.updateByExampleSelective(internshipReview, internshipReviewExample);
	}
	
	


}
